package cn.tank.service.impl;

import cn.tank.dao.ResumeDao;
import cn.tank.pojo.Resume;
import cn.tank.service.ResumeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: ZLY
 * @Date: 2020/10/31 14:59
 * @Description:
 */
@Service
public class ResumeServiceImpl implements ResumeService {
    @Autowired
    private ResumeDao resumeDao;
    @Override
    public List<Resume> queryAll() {
        return resumeDao.findAll();
    }

    @Override
    public void save(Resume resume) {
        resumeDao.save(resume);
    }

    @Override
    public void del(Long id) {
        resumeDao.deleteById(id);
    }

    @Override
    public Resume queryById(Long id) {
        return resumeDao.findById(id).get();
    }
}
